package cn.tedu.rms.statement.controller;

import cn.tedu.rms.base.response.JsonResult;
import cn.tedu.rms.statement.pojo.dto.StatementQuery;
import cn.tedu.rms.statement.pojo.vo.StatementVO;
import cn.tedu.rms.statement.service.StatementService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@Api(tags = "报表模块")
@RestController
@RequestMapping("/v1/statement")
public class StatementController {
    @Autowired
    StatementService statementService;
    @GetMapping("/select")
    public JsonResult selectByBranchId(StatementQuery statementQuery){
        log.debug("查询报表:参数={}",statementQuery);
        List<StatementVO> list=statementService.selectByBranchId(statementQuery);
        return JsonResult.ok(list);
    }
}
